﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../../js/jq/jquery.lastest.js"></script>
    <script src="../../js/ko/knockout.lastest.js"></script>
    <script type="text/javascript">
        $(function () {
            var myViewModel = {
                personName: 'Bob',
                personAge: 123,

                sayHi: function () {
                    alert(this.personName);
                }
            };

            ko.applyBindings(myViewModel);
        });
    </script>
</head>
<body>
    <hr />
    <div id="PanelA">
        The name is <span data-bind="text: personName"></span>
        <button data-bind="click: sayHi">Say hi</button>
    </div>

    <div id="PanelB">
        The name is <span data-bind="text: personName"></span>
        <button data-bind="click: sayHi">Say hi</button>
    </div>
</body>
</html>
